<template>
<div>
  <el-button type="primary" @click="start">开始任务</el-button>
  <el-button type="danger" @click="pause">暂停任务</el-button>
</div>

</template>

<script>
export default {
  name: "Task",
  setup(props, context) {
    // Attribute (非响应式对象)
    console.log(context.attrs)

    // 插槽 (非响应式对象)
    console.log(context.slots)

    // 触发事件 (方法)
    console.log(context.emit)

    function  start() {
      console.log('start')
    }
    function pause() {
      console.log('pause')
    }
    return {
      start,
      pause,
    }
  }
}
</script>

<style scoped>
</style>
